/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.uet.questiondetector.patterns;

import org.w3c.dom.Attr;
import org.w3c.dom.DOMException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.TypeInfo;
import org.w3c.dom.UserDataHandler;

/**
 *
 * @author thinhnk
 */
public class LSP {
    private LHS lhs = null;
    private String label = null;
    
    public LSP(LHS tokens, String label){
        this.label = label;        
        this.lhs = tokens;
    }
    public boolean contains(LSP sub, int thres) {
        return this.label == sub.label && this.lhs.contains(sub.lhs, thres);
    }
    public LHS getLhs(){
        return this.lhs;
    }
    public String getLabel(){
        return this.label;
    }
    public String toString(){
        return lhs.toString() + "| " + label;  
    }
}
